package com.zcz.item.service;

import com.zcz.item.mapper.CategoryMapper;
import com.zcz.item.pojo.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 王卫帅
 */
@Service
public class CategoryService {
    @Autowired
    private CategoryMapper categoryMapper;

    public List<Category> queryCaegoriesByPid(Long pid) {
        Category record = new Category();
        record.setId(pid);
        List<Category> list = new ArrayList<>();
        list.add(this.categoryMapper.selectOne(record));
      return list;
    }
}
